@model mtm.Store.Models.DepartmentModel
@{ 
    /* Copyright ? 2009 - 2010 Oleg Stuhin & Rostislav Haitovich
       To learn more about Mytrip.Mvc visit
       http://mytripmvc.net  http://mytripmvc.codeplex.com
       mytripmvc@gmail.com
       license: Microsoft Public License (Ms-PL) */
}
@{
    ViewBag.Title = Html.MytripPageTitle(Model.seotitle);
    ViewBag.Keywords = Model.seokeywords;
    ViewBag.Description = Model.seodescription;
}
@section scriptlink{
@Html.ScriptLink("MicrosoftAjax.js,MicrosoftMvcAjax.js,mtm.Delete.js,Page/Store.Index.js")
}
@section contentSmall{
@Html.Partial("Partial/_sideBar") 
}
@section contentBig{
@Html.BreadCumps(">", Model.Bread)
<div id="appr"></div>
@Html.StoreTitleDepartmentAndProducer(Model.titleDepartmentModel)
<div class="content"><div style="min-height:70px;">
@using (Html.BeginForm())
{
<table class="right"><tr><td>
@Html.TextBoxFor(m => m.Search)</td><td>
@StoreLanguage.Price_from
</td><td>
@Html.TextBoxFor(m => m.smallprice, new { style = "width:100px" })
</td><td>
@StoreLanguage.Price_to 
</td><td>
@Html.TextBoxFor(m => m.bigprice, new { style = "width:100px" })
</td><td><div class="search">
<input class="_search" type="submit" value=""/></div></td></tr></table>
<table class="right">
<tr><td>
@Html.DropDownListFor(m => m.DepartmentId, Model.SelectDepartment)
</td><td>
@Html.DropDownListFor(m => m.ProducerId, Model.SelectProducer)
</td></tr></table>
}</div></div> 
@if (Model.paging2)
{
<div class="last"></div><div class="content">
@Html.StoreSorting()</div>
}
<div class="last"></div> 
@if (Model.paging)
{
@Html.MytripPager(10, Model.takepaging, "...")
<div class="last"></div>
}
@if (!Model.titleDepartmentModel._search && Model.titleDepartmentModel.producer && Model.titleDepartmentModel.count < 0)
{
@Html.StoreProducer(Model.Producer, Model.take)
}
else if (!Model.titleDepartmentModel._search && !Model.titleDepartmentModel.producer)
{
@Html.StoreDepartment(Model.Department, Model.take)
} 
@if (Model.paging2)
{
@Html.MytripPager(10, Model.takepaging, "...")
<div class="last"></div>
@Html.StoreProduct(Model.Product, Model.take, Model.titleDepartmentModel.subDepartmentId,
        Model.titleDepartmentModel.producer, Model.DepartmentAndProducer, Model.DepartmentAndProducer2, false);
}
@if (Model.paging || Model.paging2)
{
@Html.MytripPager(10, Model.takepaging, "...")
}
@Html.Partial("Partial/_deleteModal") 
}

